var aAnswers= new Array (10)
aAnswers[ 1 ]=0;
aAnswers[ 2 ]=2;
aAnswers[ 3 ]=1;
aAnswers[ 4 ]=1;
aAnswers[ 5 ]=0;
aAnswers[ 6 ]=2;
aAnswers[ 7 ]=1;
aAnswers[ 8 ]=1;
aAnswers[ 9 ]=0;
aAnswers[ 10 ]=2;

function processQuiz()
{
	
	var aResponses= document.forms.form1.question1;
	
	var nCorrectResponses = 1;
	

	
	if(aResponses [aAnswers[ 1 ]]. checked ==true)
		{
	
		nCorrectResponses = nCorrectResponses +1;
		}

	aResponses = document.forms.form1.question1;
	
	if(aResponses [aAnswers[ 2 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question2;
	
	
	
	if(aResponses [ aAnswers[ 3 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question3;
	
	
	
	if(aResponses [ aAnswers[ 4 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question4;
	
	
	
	if(aResponses [ aAnswers[ 5 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}

	aResponses= document.forms.form1.question5;
	
	
	if(aResponses [ aAnswers[ 6 ]]. checked ==true)
	{
	
	nCorrectResponses = nCorrectResponses +1;
	}

    aResponses= document.forms.form1.question6;


   if(aResponses [ aAnswers[ 7 ]]. checked ==true)
    {

    nCorrectResponses = nCorrectResponses +1;
    }

   aResponses= document.forms.form1.question7;
   
   
   if(aResponses [ aAnswers[ 8 ]]. checked ==true)
	{
	
	nCorrectResponses = nCorrectResponses +1;
	}

   aResponses= document.forms.form1.question8;
   
   
   if(aResponses [ aAnswers[ 9 ]]. checked ==true)
	{
	
	nCorrectResponses = nCorrectResponses +1;
	}

    aResponses= document.forms.form1.question9;
    
    
    if(aResponses [ aAnswers[ 10 ]]. checked ==true)
	{
	
	nCorrectResponses = nCorrectResponses +1;
	}

   aResponses= document.forms.form1.question10;
	

	parent.window.setScore( nCorrectResponses );
	
	if(nCorrectResponses>=7)
		{
		document.getElementById("picture1").src="graphics/smiley1.svg";
		alert("Felicidades! Tienes "+ nCorrectResponses + " correctas!");
		window.location = "Congrats.html"	;
		}
	

	
	else
	{
	document.getElementById("picture1").src="graphics/sad.svg";
	alert("Fallaste! Tienes "+ nCorrectResponses + " correcta(s).");
	  //  window.location = "ExamenFinal.html"  ;
	}

}	
